



/**
 * User domain class.
 */
class Nutzer {
	static transients = ['pass']
	static hasMany = [authorities: Rolle]
	static belongsTo = Rolle

	/** Username */
	String username
	/** User Real Name*/
	String userRealName
	
	/* Kampfname des Teilnehmers */
	String kampfname
	/* Alter des Teilnehmers */
	Integer age
	
	/** MD5 Password */
	String passwd
	/** enabled */
	boolean enabled

	String email
	boolean emailShow

	/** description */
	String description = ''

	/** plain password to create a MD5 password */
	String pass = '[secret]'

	static constraints = {
		username(blank: false, unique: true)
		userRealName(blank: false)
		kampfname(blank:true, nullable:true)
		age(blank:true, nullable:true,min:0, max:99)
		description(blank:true,nullable:true, maxSize:2000)
		passwd(blank: false)
		enabled()
	}
	
	String toString() {
		return userRealName
	}
}
